//
//  DataOutputStream.h
//  TuiTe
//
//  Created by 张 霄鹤 on 10-3-15.
//  Copyright 2010 xhzhang. All rights reserved.
//

#import <Foundation/Foundation.h>


/**
 * 仿照Java实现
 * 包含 toByteArray 方法
 */
@interface DataOutputStream : NSObject {
	NSMutableData *data;
	NSInteger length;
}

/**
 * 输出内容到缓冲区
 *
 */
- (NSInteger)write:(NSInteger)b;

- (void)writeShort:(NSInteger)s;

- (void)writeInt:(NSInteger)iv;

- (void)writeLong:(long)l;

- (void)writeUTF:(NSString *)str;

- (NSInteger)writeBytes:(NSData *)bytes;

- (NSData *)toByteArray;

@end
